<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>博客详情页</title>
    <link rel="stylesheet" href="./css/detail.css">
    <link rel="stylesheet" href="./css/normal.css">
</head>
<body>
    <div class="nav">
        <img src="./pic/dog.png" alt="">
        <span class="blog_title">我的博客系统</span>
        <span class="space"></span>
        <a href="./blog_list.html"  class="nav_span">主页</a>
        <a href="./edit.html" class="nav_span">写博客</a>
        <a href="logout" class="nav_span">注销</a>
    </div>

    <div class="container">
        <div class="left">
            <div class="card">
                    <img src="./pic/src.jpg" alt="">
                
                    <h3>六道牛牛</h3>
                    <a href="https://gitee.com/liuda066/">Github地址</a>
                <div class="row">
                    <span>文章</span>
                    <span>分类</span>
                </div>
                <div class="row">
                    <span>2</span>
                    <span>1</span>
                </div>
            </div>
        </div>

        <div class="right">
            <div class="content">
                <div class="title"></div>
                <div class="date"></div>
                <div class="detail" id="content">
                    
                </div>
            </div>
        </div>
    </div>
    <script src="./js/jquery-3.3.1/jquery-3.3.1.min.js"></script>
    <script src="editormd/lib/marked.min.js"></script>
    <script src="editormd/lib/prettify.min.js"></script>
    <script src="editormd/editormd.js"></script>
    <script src="./js/common.js"></script>

    <script>

        $.ajax({
            type :"get",
            url:"blogdetail"+location.search,
            success : function(body){
                console.log(body);
                if(body==""){
                    location.assign("blog_list.html")
                }
                document.querySelector(".title").innerHTML = body.title;
                document.querySelector(".date").innerHTML = body.createTime;
                // document.querySelector(".detail").innerHTML = body.content;
                editormd.markdownToHTML("content", {
                        markdown:body.content
                });
            }
        })
        getUserInfo("detail");


        
    </script>
</body>
</html>